package com.tanhua.server.config;

import com.baidu.aip.contentcensor.AipContentCensor;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
@Data
public class AipContentCensorConfig {

    //设置APPID/AK/SK
    public static final String APP_ID = "24046871";
    public static final String API_KEY = "nGS70AgWHj9FOSMf1LnMcfKx";
    public static final String SECRET_KEY = "GRdE1BLRRDfdgDhB8GroiAl0eYhlVSGA";


    @Bean
    public AipContentCensor AipContentCensor(){


        AipContentCensor client = new AipContentCensor(APP_ID, API_KEY, SECRET_KEY);
        // 可选：设置网络连接参数
        client.setConnectionTimeoutInMillis(2000);
        client.setSocketTimeoutInMillis(60000);

        return client;
    }

}


























